export function share (path = '/pages/home/home', query = {}, title, imageUrl = '') {
  let url = ''
  let arr = []
  query.id = wx.getStorageSync('userInfo')['id']
  for (const key in query) {
    if (query.hasOwnProperty(key)) {
      const element = query[key];
      arr.push(`${key}=${element}`)
    }
  }
  url = `${path}?${arr.join('&')}`
  return {
    title: title || '悦己抒心',
    path: url,
    imageUrl: imageUrl,
  };
}